package cn.funeralobjects.youtube.dl.extension.service;

import cn.funeralobjects.youtube.dl.extension.model.DownloadTask;
import cn.funeralobjects.youtube.dl.extension.model.DownloadingStatus;
import cn.funeralobjects.youtube.dl.extension.model.TaskStatus;

import java.util.List;
import java.util.function.Consumer;

/**
 * @author FuneralObjects
 * Create date: 2020/4/3 2:54 PM
 */
public interface DownloadService {

    /**
     * 文件夹路径
     */
    String DOWNLOAD_FOLDER_PATH = "./download";

    List<DownloadTask> getCompleted();

    DownloadingStatus getDownloadingStatus();

    String getCurrentLog(String id, String format);

    void addDownloadTask(String id, String format, String title, String proxy);

    void addNextConsumer(String key, Consumer<TaskStatus> consumer);

    void removeConsumer(String key);

    void retryInterrupt(String id, String format);

    void stop(String id, String format);

    void removeInterrupt(String id, String format);

}
